<%@ page language="java" contentType="text/html; charset=UTF-8"    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="sec"    uri="http://www.springframework.org/security/tags"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>

<sec:authentication property="principal" var="currentPrincipal" scope="page" />

<fmt:setBundle basename="ApplicationMessage" />
<fmt:setLocale value="zh_CN" />

<!DOCTYPE html>
<html lang="zh-CN">
<head>

  <%@ include file="/WEB-INF/include/meta.jsp"%>
  <%@ include file="/WEB-INF/include/css.jsp"%>

</head>

<body class="ms-theme-blue">

  <%@ include file="/WEB-INF/include/header.jsp"%>
    
  <%@ include file="/WEB-INF/include/submenu.jsp"%>
  
  <div class="container-fluid ms-container has-ms-sidemenu">
    
    <ol class="ms-breadcrumb breadcrumb">
      <li class="active">运输业务管理-报销信息列表</li>
    </ol>
    
    <div class="ms-content-layout">
    
      <form class="form-horizontal ms-form form-personal-info" method="GET" action="${ctx.host}/reimburses/create" data-validate=true>
      
		    <div class="ms-operation-bar no-margin no-bottom-border clearfix">
		      <div class="ms-operation-group pull-right">
	          <button type="submit" class="btn ms-btn ms-btn-blue">下一步</button>
		      </div>
		    </div>
		    
		    <div class="invalid-message" style="display: none;">
          <h6>提醒&nbsp;:&nbsp;请至少选择一条报销单</h6>
        </div>
	      
	      <table class="table table-hover ms-table">
	        <thead>
	            <tr>
	              <th><input type="checkbox" id="select-all" /></th>
	              <th>运输公司</th>
	              <th>派车单号</th>
	              <th>起始地</th>
	              <th>目的地</th>
	              <th>计划出发日期</th>
	              <th>商品车数量</th>
	              <th>重载公里数</th>
	              <th>空载公里数</th>
	              <th>路桥费</th>
	              <th>其他费用</th>
	              <th>内部油价</th>
	              <th>外部油价</th>
	              <th>重载油耗</th>
	              <th>空载油耗</th>
	            </tr>
	        </thead>
	        <tbody>
	          <c:forEach items="${result}" var="result">
	            <tr>
	              <td><input type="checkbox" name="dispatchOrderIds" value="${result.id}"></td>
	              <td>${result.organizationName}</td>
	              <td>${result.dispatchOrderCode}</td>
	              <td>${result.startFacilityName}</td>
	              <td>${result.endFacilityName}</td>
	              <td><fmt:formatDate value="${result.leavingTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
	              <td>${result.actualLoadNumber}</td>
	              <td><fmt:formatNumber value="${result.fullLoadDistance}" minFractionDigits="2" /></td>
	              <td><fmt:formatNumber value="${result.emptyLoadDistance}" minFractionDigits="2" /></td>
	              <td><fmt:formatNumber value="${result.roadFee}" minFractionDigits="2" /></td>
	              <td><fmt:formatNumber value="${result.otherFee}" minFractionDigits="2" /></td>
	              <td><fmt:formatNumber value="${result.internalOilPrice}" minFractionDigits="2" /></td>
	              <td><fmt:formatNumber value="${result.externalOilPrice}" minFractionDigits="2" /></td>
	              <td><fmt:formatNumber value="${result.fullOilUsagePerKm}" minFractionDigits="2" /></td>
	              <td><fmt:formatNumber value="${result.emptyOilUsagePerKm}" minFractionDigits="2" /></td>
	            </tr>
	          </c:forEach>
	        </tbody>
	        
	      </table>

      </form>
    </div> 
  </div>       
  
  <%@ include file="/WEB-INF/include/script.jsp"%>
  <d:resource type="script" root="${ctx.resource}/build" src="js/page/business/reimburse/reimburse-list.js" />
  <script type="text/javascript">
    require(['page/business/reimburse/reimburse-list'], function(page) {
      page.init()
    })
  </script>
  
</body>
</html>